/** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ ;
layui.define(['consts','jquery'],function(e) {
    var i = (layui.$, layui.layer, layui.laytpl, layui.view, layui.admin);
	var consts = layui.consts;
	var $ = layui.jquery;
    i.events.logout = function() {
        i.req({
            url: consts.url.logout,
            type: "get",
            data: {},
			 beforeSend: function (XMLHttpRequest) {
                    XMLHttpRequest.setRequestHeader("token", sessionStorage.getItem(consts.common.token));
                },
            done: function(e) {
				sessionStorage.removeItem(consts.common.token);
                i.exit(function() {
                    location.href = consts.url.loginhtml
                })
            }
        })
    }, e("common", {})
});